package com.zr.userLive.mapper;

import com.zr.userInfo.pojo.UserInfo;
import com.zr.userInfo.pojo.UserInfoAddVo;
import com.zr.userLive.pojo.UserLive;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * Created by Administrator on 2019/7/3.
 */
@Mapper
public interface UserLiveMapper {

    @Insert("insert into userlive (maritalStatus,liveStatus,liveYear,detailedAddress,createTime,createName,updateTime,updateName) values" +
            "(#{maritalStatus},#{liveStatus},#{liveYear},#{detailedAddress},#{createTime},#{createName},#{updateTime},#{updateName})")
    int userPicture(UserLive userLive);

    @Select("select maritalStatus,liveStatus,liveYear,detailedAddress from userinfo where loginId = #{loginId}")
    UserInfoAddVo queryLoginId(Integer loginId);

    @Select("select name,idCode,phone,qqCode from userinfo where id=#{id},payStatus=0")
    UserInfo queryByUserIfoid(Integer id);
}
